/**
 * 用户动态基础服务接口
 */
package com.hanhai.zrb.api.biz.service;

import java.util.List;

import com.hanhai.zrb.model.common.PageList;
import com.hanhai.zrb.model.userDynamic.DynamicType;
import com.hanhai.zrb.model.userDynamic.ExtraInfo;
import com.hanhai.zrb.model.userDynamic.UserDynamic;
import com.hanhai.zrb.model.userDynamic.dto.UserDynamicDto;

/**
 * @author leiruiqi@hanhai.com
 *
 */
public interface UserDynamicService {

	/**
	 * 查用户所有的动态
	 * 
	 * @param userId
	 * @return
	 */
	List<UserDynamic> queryAllByUserId(Long userId);
	
	/**
	 * 根据条件分业查询
	 * 
	 * @param dto
	 * @param pageNum
	 * @param pageSize
	 * @return
	 */
	PageList queryPageByDto(UserDynamicDto dto,int pageNum,int pageSize);
	
	/**
	 * 根据条件分页查询
	 * 不计算总条数，性能会高很多
	 * 
	 * @param dto
	 * @param pageNum
	 * @param pageSize
	 * @return
	 */
	PageList queryPageNoCountByDto(UserDynamicDto dto,int pageNum,int pageSize);
	
	/**
	 * 根据model创建动态
	 * 
	 * @param userDynamic
	 */
	void createUserDynamic(UserDynamic userDynamic);
	
	/**
	 * 根据参数创建动态
	 * 
	 * @param uid
	 * @param type
	 * @param target
	 * @param title
	 * @param extraInfo
	 */
	void createUserDynamic(Long uid,DynamicType type,String target,String title,ExtraInfo extraInfo);
	
	/**
	 * 根据参数创建动态
	 * 
	 * @param uid
	 * @param type
	 * @param target
	 * @param title
	 */
	void createUserDynamic(Long uid,DynamicType type,String target,String title);
	
	
	/**
	 * @param list
	 */
	void batchConverExtraDateForView(List<UserDynamic> list);
	
	boolean deleteDynamic(List<Long> ids);
}
